package graduate.wangyaqi.FillingQuestions;

import graduate.wangyaqi.ErrorCorrectionQuestions.ErrorCorrectionQuestions;
import graduate.wangyaqi.SeveralQuestions.SeveralQuestions;
import org.springframework.data.repository.CrudRepository;

import java.util.Optional;

public interface FillingQuestionsRepository extends CrudRepository<FillingQuestions,Long> {
    Iterable<FillingQuestions> findAllByTaotiID(long taotiID);

    int countAllByTaotiID(Long taotaoId);

    FillingQuestions getFirstByTaotiIDAndIdGreaterThan(long taotiId, long id);

    FillingQuestions getFirstByTaotiIDAndIdLessThanOrderByIdDesc(long taotiId, long id);

    @Override
    Optional<FillingQuestions> findById(Long aLong);
}
